$(document).ready(function() {
    // Handle click on correlation analysis link
    $("#correlation_link").click(function(e) {
        e.preventDefault();
        // Load correlation analysis page content dynamically
        $.ajax({
            url: '/correlation',
            type: 'GET',
            success: function(data) {
                // Process correlation analysis results and update correlation.html
                // Example: Display correlation coefficients in placeholders
                $("#pm25_pm10_correlation").text(data.pm25_pm10);
                $("#so2_no2_correlation").text(data.so2_no2);
                // Optionally, update charts or tables with the correlation analysis results
            }
        });
    });
});
